package com.example.result;

import lombok.Data;

import java.util.Map;

@Data
public class JsonResult{
    private Integer code; //编码：1成功，0和其它数字为失败
    private String msg; //错误信息
    private Object data; //数据
    private Map<Object,Object> map; //动态数据

    public JsonResult(){}
    public JsonResult(Integer code,String msg){
        this.code=code;
        this.msg=msg;
    }
    public JsonResult(Integer code,String msg,Object data){
        this.code=code;
        this.msg=msg;
        this.data=data;
    }
    public JsonResult add(Map<Object,Object> map) {
        this.map=map;
        return this;
    }

}
